package com.tul.exercise.base.fanclass.eg2;

/**
 * @Description 《java编程思想》15 泛型.1 示例 3
 *  元组类:2个长度的元组
 *
 **/
public class TwoTuple<A, B> {
    // 初始化后不能修改
    public final A first;

    // 初始化后不能修改
    public final B second;

    public TwoTuple(A first, B second) {
        this.first = first;
        this.second = second;
    }

    public String toString() {
        return "(" + first + ", " + second + ")";
    }
}
